/*
* 测试代码
*/
class HttpDemo{
    constructor(){
        var http = new Laya.HttpRequest();
        http.once(Laya.Event.PROGRESS ,this,this.onProgress);
        http.once(Laya.Event.PROGRESS,this,this.onProgress); //数据传输中
        http.once(Laya.Event.COMPLETE,this,this.onComplete); //数据传输完成后，会返回一个data
        http.once(Laya.Event.ERROR,this,this.onError);    //数据传输失败后返回
        //post数据的写法
        http.send("https://bangumi.bilibili.com/jsonp/slideshow/101.ver",'', 'get', 'text');
    }


     onProgress(e:any):void{
        console.log(e);
    }

     onComplete(e:any):void{
        console.log(e);
    }

    onError(e:any):void{
        console.log(e);
    }
}

// new HttpDemo();